# Contributor: Kasper K <kasperkantz@outlook.com>
# Maintainer: Kasper K <kasperkantz@outlook.com>
pkgname=libirecovery
pkgver=1.0.0
pkgrel=0
pkgdesc="Library and utility to talk to iBoot/iBSS via USB on Mac OS X, Windows, and Linux"
url="https://libimobiledevice.org"
arch="all"
license="LGPL-2.1-or-later"
makedepends="readline-dev libusb-dev"
subpackages="$pkgname-dev $pkgname-progs"
source="https://github.com/libimobiledevice/libirecovery/releases/download/$pkgver/libirecovery-$pkgver.tar.bz2"

build() {
	./configure \
		--host=$CHOST \
		--build=$CBUILD \
		--prefix=/usr \
		--disable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

progs() {
	pkgdesc="Tools that talks iPhone and iPod Touch devices' protocols on Linux"
	depends=""
	amove usr/bin
}

sha512sums="7e6f53766c85c714c2d4088e880f56486bcb4d198a9da1108d31f8f1a2444f45ac319a90a4706d00a24cbddc0af9ce8dddf267ba458fe3fa225cc14ea7150797  libirecovery-1.0.0.tar.bz2"
